package com.qf.FinancialManagement.controller;

import com.qf.FinancialManagement.domain.TmsAll;
import com.qf.FinancialManagement.service.PraService;
import com.qf.common.core.controller.BaseController;
import com.qf.common.core.domain.AjaxResult;
import com.qf.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * ---好运常在---
 *
 * @author ChengShuaiKe
 * @date 2025/9/8 0008
 * @desc
 */
@RestController
@RequestMapping("/tms/pra")
public class PraController extends BaseController {
    @Autowired
    private PraService praService;

    /**
     * 查询列表数据
     */
    @RequestMapping("/list")
    public TableDataInfo list(@RequestParam Map<String, Object> params) {
        startPage();
        List<TmsAll> list = praService.selectAll(params);
        return getDataTable(list);
    }

    /**
     * 删除和批量删除
     */
    @DeleteMapping("/del")
    public AjaxResult del(@RequestBody List<Integer> ids) {
        praService.deleteBatch(ids);
        return AjaxResult.success("删除成功");
    }
}
